const name = 'grimm-item'
export default {
  name,
  props: {
    label: {
      type: [String, Number, Boolean],
      default: ''
    },
    override: Array
  },
  render(h) {
    const {$slots: {label, override}, $slots} = this
    const labelNode = (label && label[0]) || this.label
    const children = [
      h('label', {}, [labelNode]),
      h('span', {}, $slots.default)
    ]
    return h('div', {
      'class': name
    }, override || children)
  }
}
